package com.zmn.plat.dubbo.interfaces.netcall;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

import com.zmn.common.dto.ResponseDTO;
import com.zmn.plat.dubbo.dto.netcall.ImAccountDRO;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

/**
 * @author sunlife
 * @since 2019/7/12 19:22
 */
@Api(value = "网易云信账户服务", tags = {"网易云信账户服务"})
public interface ImAccountRemoteService {

    /**
     * 查询网易云信账户信息
     *
     * @param staffId
     * @return
     */
    @ApiOperation(value = "查询网易云信账户信息", response = ResponseDTO.class, notes = "网易云信账户信息", tags = {"账户信息"})
    ResponseDTO<ImAccountDRO> getAccountByStaffId(@NotNull(message = "staffId不能为空") @Positive(message = "staffId必须为大于0的正整数") @ApiParam(value = "账户id", required = true) Integer staffId);

    /**
     * 冻结账户
     *
     * @param staffId
     * @return
     */
    @ApiOperation(value = "冻结账户", response = ResponseDTO.class, notes = "冻结账户", tags = {"冻结账户"})
    ResponseDTO<Boolean> blockImAccount(@NotNull(message = "staffId不能为空") @Positive(message = "staffId必须为大于0的正整数") @ApiParam(value = "账户id", required = true) Integer staffId);

    /**
     * 解冻账户
     *
     * @param staffId
     * @return
     */
    @ApiOperation(value = "解冻账户", response = ResponseDTO.class, notes = "解冻账户", tags = {"解冻账户"})
    ResponseDTO<Boolean> unblockImAccount(@NotNull(message = "staffId不能为空") @Positive(message = "staffId必须为大于0的正整数") @ApiParam(value = "账户id", required = true) Integer staffId);

    /**
     * 更新用户名
     *
     * @param staffId
     * @param name
     * @return
     */
    @ApiOperation(value = "更新用户名", response = ResponseDTO.class, notes = "更新用户名", tags = {"更新用户名"})
    ResponseDTO<Boolean> updateNameByStaffId(@NotNull(message = "staffId不能为空") @Positive(message = "staffId必须为大于0的正整数") @ApiParam(value = "账户id", required = true) Integer staffId,
        @NotNull(message = "name不能为空") @Positive(message = "name必须为大于0的正整数") @ApiParam(value = "用户名", required = true) String name);
}
